//
//  TouchMoveScale.h
//  cake
//
//  Created by luotianqiang1 on 17/2/28.
//
//

#ifndef TouchMoveScale_h
#define TouchMoveScale_h

#include "BaseStepLayer.h"
#include "TouchMoveComponent.h"
class TouchMoveScale : public TouchMoveComponent {
    DECLARE_COMPONENT_DYNCLASS(TouchMoveScale);
    CC_SYNTHESIZE(float, maxScale, MaxScale);
    CC_SYNTHESIZE(float, minScale, MinScale);
public:
    TouchMoveScale();
    virtual bool init();
protected:
    virtual bool touchBeganLis(Touch*,Event*);
    virtual void touchMoveLis(Touch*,Event*);
    virtual void touchEndLis(Touch*,Event*);
    virtual void touchCanceLis(Touch*,Event*);
    
    void move(Vec2 distance);
    void scale(float distace);
protected:
    std::vector<Touch*> _touches;
    Vec2 touchPoint;
    float length;//前一次两个touch点之前的距离
};

#endif /* TouchMoveScale_h */
